feat(difs): Add Objectstore columns to ProjectDebugFile#117500
Conversation
|
This PR has a migration; here is the generated SQL for for --
-- Alter field file on projectdebugfile
--
SET CONSTRAINTS "sentry_projectdsymfile_file_id_bdf41a41_fk_sentry_file_id" IMMEDIATE; ALTER TABLE "sentry_projectdsymfile" DROP CONSTRAINT "sentry_projectdsymfile_file_id_bdf41a41_fk_sentry_file_id";
ALTER TABLE "sentry_projectdsymfile" ALTER COLUMN "file_id" DROP NOT NULL;
ALTER TABLE "sentry_projectdsymfile" ADD CONSTRAINT "sentry_projectdsymfile_file_id_bdf41a41_fk_sentry_file_id" FOREIGN KEY ("file_id") REFERENCES "sentry_file" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_projectdsymfile" VALIDATE CONSTRAINT "sentry_projectdsymfile_file_id_bdf41a41_fk_sentry_file_id";
--
-- Add field storage_path to projectdebugfile
--
ALTER TABLE "sentry_projectdsymfile" ADD COLUMN "storage_path" text NULL;
--
-- Add field content_type to projectdebugfile
--
ALTER TABLE "sentry_projectdsymfile" ADD COLUMN "content_type" text NULL;
--
-- Add field file_size to projectdebugfile
--
ALTER TABLE "sentry_projectdsymfile" ADD COLUMN "file_size" bigint NULL;
--
-- Add field date_created to projectdebugfile
--
ALTER TABLE "sentry_projectdsymfile" ADD COLUMN "date_created" timestamp with time zone NULL; |
7c7b0ee to
0b95ff7
Compare
Add new nullable columns (storage_path, content_type, file_size, date_created) and make the File FK nullable in preparation for migrating debug files to Objectstore.
0b95ff7 to
4fe3b25
Compare
|
Is the idea behind making the |
|
Yeah @loewenheim, we could very well split this into 2 separate migrations, would it be preferable to do it that way? The intention was not really to spare a migration, but to make the |
|
If having two separate migrations isn't a concern, I would prefer it if the |
|
Yeah that makes sense, I'll change it. |
|
I'm going to merge this as is, as making the |
Adds new columns to house Objectstore-backed difs.
These will lose the
fileFK and gain thestorage_pathfield.In addition, we also need to add
content_type,file_sizeanddate_created, as those were previously fields ofFile.Naturally, during the migration period, both of these need to be nullable, so we need to assert the invariants we know to be true at runtime.
Ref FS-364